import Cookies from 'js-cookie'

const UserInfoKey = 'dikede_pc_userInfo'

export function getUserInfo() {
  return JSON.parse(Cookies.get(UserInfoKey) || JSON.stringify(''))
}

export function setUserInfo(userInfo) {
  return Cookies.set(UserInfoKey, JSON.stringify(userInfo))
}

export function removeUserInfo() {
  return Cookies.remove(UserInfoKey)
}
